/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;
import Model.EmailSendList;
import RssEasy.Core.MailExtend;
import javax.servlet.jsp.PageContext;

/**
 *
 * @author Administrator
 */
public class SendMail extends MailExtend {

    public String myid = "";
    PageContext context;

    public SendMail(PageContext pageContext) {
        super("smtp.exmail.qq.com", "service@rsseasy.com", "RSSeasy2015");
        this.context = pageContext;
    }

    @Override
    public void onSend() {
        try {
            EmailSendList mailsend = new EmailSendList(context);
            mailsend.keyvalue("email", this.to).keyvalue("title", this.title).keyvalue("matter", this.matter).keyvalue("myid", this.myid).timestamp();
            mailsend.append().submit();
        } catch (Exception e) {

        }
    }
}
